#ifndef CONTINUOUSMOTOR_H
#define CONTINUOUSMOTOR_H

class ContinuousMotor;

#include "../Systems/abstractsystem.h"
#include "abstractmotor.h"
#include "consign.h"
#include <QTimer>
#include <QList>

class ContinuousMotor : public AbstractMotor
{
    Q_OBJECT

public:
    ContinuousMotor(AbstractSystem *a_sys, int a_id, int freq, double a_delay=0, double a_tau=0, double a_imprecision=0);
    void setConsign(double cons);
    double getState();
    void setState(double s);

public slots:
    void update();

private:
    AbstractSystem *sys;
    int id;
    double dt, speed, state, tau, imprecision;
    int delay;
    double currentCons;
    QList<Consign> consigns;
};

#endif // CONTINUOUSMOTOR_H
